#include "FileDescEntry.h"

FileDescEntry::FileDescEntry(int filePosition, string filePermissions, int inodePointer):
			filePos(filePosition), permissions(filePermissions),
			pointerToInode(inodePointer), connectedProcessesCounter(1) {}

FileDescEntry::~FileDescEntry(){}

int FileDescEntry::getFilePosition() {
	return filePos;
}

string FileDescEntry::getFilePermission() {
	return permissions;
}

int FileDescEntry::getPointerToInode() {
	return pointerToInode;
}

void FileDescEntry::setFilePosition(int newFilePosition) {
	filePos = newFilePosition;
}

void FileDescEntry::setFilePermission(string newFilePermissions) {
	permissions = newFilePermissions;
}

void FileDescEntry::setPointerToInode(int newPointerToInode) {
	pointerToInode = newPointerToInode;
}

void FileDescEntry::incNumOfConnectedProcesses() {
	connectedProcessesCounter++;
}
void FileDescEntry::decNumOfConnectedProcesses() {
	connectedProcessesCounter--;
}

int FileDescEntry::getNumOfConnectedProcesses() {
	return connectedProcessesCounter;
}
